import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Main',
    hidden:true,
    redirect: '/admin/Evaluation',
  },
  {
    path:'/404',
    component:() => import('../views/404.vue')
  },
  {
    path:'/admin',
    name:'admin',
    component:() => import('../views/Layout/index.vue'),
    children:[
      {
        path:'evaluation',
        name:'evaluation',
        component:()=>import('@/views/Evaluation/evaluation.vue'),
        meta: { title: '护理评估', affix: true }
      },
      {
        path:'nursingProblems',
        name:'nursingProblems',
        component:() => import('@/views/nursingProblems/nursingProblems.vue'),
        meta: { title: '护理问题'}
      }
    ]
  },
  {path:'*',redirect:'/404',hidden:true}
]

const router = new VueRouter({
  routes
})

export default router
